function is always of fixed length, whereas the input is of arbitrary length.

Digital certificate: A digital certificate is a bit of information that certifies

the owner to be genuine.

Certificate authority: The Web server is trusted by an independent source

known as a certificate authority. Both the computers participating in

communication trust the CA which acts as the middleman. It provides the

public keys of each computer, which confirms that each computer is, in fact,

who they say they are.

Questions

1. Check the keys in the alphabet-substitution cipher.

2. Write a note on secret and public-key cryptography schemes using

examples to illustrate your claims and state the advantages of each

scheme.

3 . Explain the Diffie– Hellman key distribution scheme with an example.

Solutions

1. This learning activity consists of adding a method to the code for the

alphabet-substitution

cipher.

It

includes

a

program

file

AlphabetSubstitutionCipher.j ava. As long as a valid key is entered by

the user, the program shall perform its processing and provide the

required output to the user. A key together with a plaintext message is

accepted by the program, and it turns the plaintext message into the

corresponding encrypted ciphertext.

Here is a sample run of the program:

The enciphered counterpart of each of the 26 letters of the alphabets in

order is shown by the key, which is a string in the alphabet—

substitution

cipher.

Here,

the

user

has

entered

the

key

“QWERTYU IOPASDFGHJ K LZ XCVBNM”,

which

would

correspond to the following mapping:

A B C D E F G H I J K L M N O P Q R S T

U V W X Y Z

↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓